package metamodel.visitor;

import metamodel.*;

import java.util.Collection;

/**
 * User: felix
 * Date: 19.06.2005
 */
public interface ObjectGraphVisitor {
    public void visitRoot(ClassNode classNode, Object data);
    public void visitObject(ClassNode classNode, DeepProperty property,Object value, Object parent);

    public void visitCollection(CollectionRef property, Object value, Object parent);

    public void visitFlatProperty(FlatProperty property, Object value, Object parent, boolean hasNext);

    public void visitCyclic(ClassNode classNode, DeepProperty property, Object value, Object parent, boolean hasNext);

    public void endRoot(ClassNode classNode, Object data);

    public void endObject(ClassNode classNode, DeepProperty dp, Object data, Object parent, boolean hasNext);

    public void endCollection(CollectionRef collRef, Collection data, Object parent, boolean hasNext);

    public void visitNull(Property property, Object parent, boolean hasNext);
}
